﻿
Imports System.Data
Imports VSModel
Imports Cls_Common
Imports SecurityService
Partial Class FrontEnd_Control_Users_ContentEditor
    Inherits System.Web.UI.UserControl
    Private Shared ReadOnly log As log4net.ILog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)

#Region "Sub and Function "
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            'active tab tuong ung voi Page
            'InVisble button ko can thiet
            If Request.PhysicalPath.Contains("hop-tin-nhan-den.html") Then
                lbtList.CssClass = "current_manage"
                lbtList.Text = "<span class='current_manage'>Quản lý</span>"

                lbtView.Visible = False
                btnDelete.Visible = False
                tabs_state.Visible = False

            ElseIf Request.PhysicalPath.Contains("tin-nhan-den") Then
                lbtView.CssClass = "current_manage"
                lbtView.Text = "<span class='current_manage'>Xem</span>"
                'Permission

            End If
            If Not Page.RouteData.Values("Id") Is Nothing Then hidID.Value = Page.RouteData.Values("Id") 'Load list action status    Dim ArrId As String() = hidID.Value.Split(",")    If (ArrId.Length <= 1) Then        LoadListStatus(hidID.Value)    End If    'Permission    btnDelete.Visible = HasPermission(Function_Name.Raovat, Session("RoleID"), 0, Audit_Type.Delete)
            btnDelete.Attributes.Add("onclick", "return ComfirmDialog('Bạn có chắc chắn muốn xóa không?',0,'" + btnDelete.ClientID + "','" + hidID.Value.ToString + "',1);")
        End If
    End Sub

    Protected Sub lbtList_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbtList.Click
        Response.Redirect(MainDomain & "hop-tin-nhan-den.html")
    End Sub

    Protected Sub lbtView_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbtView.Click
        Response.Redirect(MainDomain & "tin-nhan-den/ " & hidID.Value & ".html")
    End Sub
    
  
#End Region

End Class
